﻿<?php

require_once 'constantes.php';
require_once 'DaoConn.class.php';

class DaoFilm_Pays extends DaoConn{
	
	
		function getFilm_PaysAll() {
		$this->open();
		try {
			$sql = "SELECT * FROM ".FILM_PAYS.";";
			$req = $this->bdd->prepare($sql);
			$req->execute();
			$tab = array();			
			while($result = $req->fetch(PDO::FETCH_OBJ)){
				array_push($tab, $result);				
			}
			$req->closeCursor();
		} catch (Exception $e) {
			die('ERREUR SQL : '.$e->getMessage());
		}
		$this->close();
		return $tab;
	}

}